using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.Wiki.Entities
{
public partial class Attention
{
readonly static Action<Attention,object>[] _SetValues=new Action<Attention,object>[]{(r,t)=>r.Alias=Reflection.ParseObject(t, r.Alias),(r,t)=>r.Id=Reflection.ParseObject(t, r.Id),(r,t)=>r.ProjectTotal=Reflection.ParseObject(t, r.ProjectTotal),(r,t)=>r.Signature=Reflection.ParseObject(t, r.Signature),(r,t)=>r.SubjectReplyTotal=Reflection.ParseObject(t, r.SubjectReplyTotal),(r,t)=>r.SubjectTotal=Reflection.ParseObject(t, r.SubjectTotal),(r,t)=>r.SubjectViewTotal=Reflection.ParseObject(t, r.SubjectViewTotal)};
readonly static string[] _Columns=new string[]{"Alias","Id","ProjectTotal","Signature","SubjectReplyTotal","SubjectTotal","SubjectViewTotal"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"Alias", this.Alias);
AppendValue(action,"Id", this.Id);
AppendValue(action,"ProjectTotal", this.ProjectTotal);
AppendValue(action,"Signature", this.Signature);
AppendValue(action,"SubjectReplyTotal", this.SubjectReplyTotal);
AppendValue(action,"SubjectTotal", this.SubjectTotal);
AppendValue(action,"SubjectViewTotal", this.SubjectViewTotal);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[7];
cols[0]= RecordColumn.Column("Alias",this.Alias);
cols[1]= RecordColumn.Column("Id",this.Id);
cols[2]= RecordColumn.Column("ProjectTotal",this.ProjectTotal);
cols[3]= RecordColumn.Column("Signature",this.Signature);
cols[4]= RecordColumn.Column("SubjectReplyTotal",this.SubjectReplyTotal);
cols[5]= RecordColumn.Column("SubjectTotal",this.SubjectTotal);
cols[6]= RecordColumn.Column("SubjectViewTotal",this.SubjectViewTotal);
return cols;
}

}
}

